import React from 'react'
import { useNavigate } from 'react-router-dom'

function Index({left,title,right}) {
  const navigate=useNavigate()
  return (
    <div  
    style={{
    display:'flex',
     marginLeft:'20px',
     height:'40px',
     lineHeight:'40px'
    }}
    >
        <div onClick={()=>navigate(-1)}>{left}</div>
        <div style={{  marginLeft:'130px',}}>{title}</div>
        <div style={{marginLeft:'140px'}}>{right}</div>
    </div>
  )
}

export default Index
